SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 46762: A "numeric field overflow" error occurs when you create or insert data into a Greenplum database table

DetailsAboutRate It

A numeric overflow error might occur when you use SAS/ACCESS® Interface to Greenplum to create or insert data into a Greenplum database table from a SAS data set. The problem occurs if one or more columns in the table has a format that specifies a scale greater than zero.

Here is an example. A SAS data set column has a format of 8.2 and it stores a value of 100,000. Executing either of the two code samples below can produce the error.

Example 1:
proc sql; create db.table as select * from sas.table; quit;

Example 2:
  data db.table;
     set sas.table;
run;
The error would resemble the following:
ERROR: CLI execute error: [SAS ACCESS to Greenplum][ODBC Greenplum Wire Protocol
       driver][Greenplum]ERROR: numeric field overflow(Detail A field with
       precision 7, scale 2 must round to an absolute value less than 10^5. Rounded 
       overflowing value: 100000.00;File numeric.c;Line 3962;Routine apply_typmod;) :
       [SAS ACCESS to Greenplum][ODBC Greenplum Wire Protocol driver][Greenplum]Failed
       transaction. The current transaction rolled back.

Workaround

To work around this issue, programmatically specify the format on the column by using the SAS DBTYPE= option:
   proc sql;
       create table db.table(dbtype=(Income='numeric(8,2)' Salary='numeric(8,2)' Cash='numeric(8,2)') as
       select * from sas.table;
   quit;


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to GreenplumMicrosoft® Windows® for x649.3 TS1M2
Microsoft Windows Server 2003 Datacenter Edition9.3 TS1M2
Microsoft Windows Server 2003 Enterprise Edition9.3 TS1M2
Microsoft Windows Server 2003 Standard Edition9.3 TS1M2
Microsoft Windows Server 2003 for x649.3 TS1M2
Microsoft Windows Server 20089.3 TS1M2
Microsoft Windows Server 2008 for x649.3 TS1M2
Microsoft Windows XP Professional9.3 TS1M2
Windows 7 Enterprise 32 bit9.3 TS1M2
Windows 7 Enterprise x649.3 TS1M2
Windows 7 Home Premium 32 bit9.3 TS1M2
Windows 7 Home Premium x649.3 TS1M2
Windows 7 Professional 32 bit9.3 TS1M2
Windows 7 Professional x649.3 TS1M2
Windows 7 Ultimate 32 bit9.3 TS1M2
Windows 7 Ultimate x649.3 TS1M2
Windows Vista9.3 TS1M2
Windows Vista for x649.3 TS1M2
64-bit Enabled AIX9.3 TS1M2
64-bit Enabled Solaris9.3 TS1M2
HP-UX IPF9.3 TS1M2
Linux9.3 TS1M2
Linux for x649.3 TS1M2
Solaris for x649.3 TS1M2
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.